home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Dec 89 / 0129-View signature "bug"-Nov89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.2 KB  |  60 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    1890420                         25-Nov-89        16:11
  4.  
  5. From:   SCHMUCKER1                      Schmucker, Kurt
  6.  
  7. To:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    View signature "bug"
  10.  
  11.     The following view "glitch" caused me several days of befuddlement, so I
  12. thought I would pass it on.
  13.  
  14.     Upon issuing the menu command to bring up a dialog in my MacApp
  15. application, I fell into the debugger with the following lines:
  16.  
  17. Unable to find subview: ''
  18. ProgramBreak: Unable to find parent view for template
  19. stopped at Break  TEVTHANDLER.DOCREATEVIEWS Seg#: 12  Self: $0065B1E0 is
  20. TQUADAPPLICATION
  21.  
  22. (In case AppleLink ate the character in the quotes in the first line, it is the
  23. open square.  The same character you see in the Chicago font for option-k or
  24. control-k.)
  25.  
  26.     I had constructed this dialog with ViewEdit, so that was the first thing I
  27. suspected.  (Sorry Russ and Lonnie.)  I looked around the view and everything
  28. seemed fine.  There was no view with the open-square signature.  I de-rezed the
  29. view and examined the textual version, and that, too, looked OK.  I re-rezed
  30. the text and used the newly constructed view (again suspecting ViewEdit.)  The
  31. problem was still there.  I made sure that I had included the standard
  32.  
  33.    IF gDeadStripSuppression THEN
  34.    BEGIN
  35.    IF Member(TObject(NIL), TQWAboutBoxView) THEN;
  36.  
  37.         .
  38.         .
  39.         .
  40.    END;
  41.  
  42. technique to supress dead stripping of the view classes.  In probing around
  43. with the debugger, I noticed that I had forgotten to provide a Fields method
  44. for the main view of the dialog.  While adding it, I found the REAL problem.
  45.  
  46.     My main dialog view was descended from TDialogView (naturally), but I had
  47. made it with a TView template in ViewEdit, not a TDialogView one!  ViewEdit had
  48. constructed it with proper view template records for a TView, but my MacApp
  49. code was expecting it to be a TDialogView subclass.  Boom.
  50.  
  51.     Moral: Fancy tools like ViewEdit can really help you out, but they are
  52. still only as fool-proof as the person using them.
  53.  
  54.     If I can just chase done this one other bug - I'm SURE it is a compiler
  55. error ...
  56.  
  57.  
  58.                     Kurt
  59.  
  60.